<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<body>
<p id="result" xmlns:a="urn:x-test:a" style="visibility: hidden;"></p>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script type="text/javascript">//<![CDATA[

test(function () {
    var result = document.getElementById("result");
    result.innerHTML = "<span a:test='some value via innerHTML'>Testing</span>";
    var spanElement = result.firstChild;
    assert_equals(spanElement.namespaceURI, "http://www.w3.org/1999/xhtml", "<span> in correct namespace");
    assert_true(spanElement.hasAttributeNS("urn:x-test:a", "test"), "<span> has 'test' attribute in the 'urn:x-test:a' namespace");
    assert_equals(spanElement.getAttributeNS("urn:x-test:a", "test"), "some value via innerHTML", "'test' attribute in the 'urn:x-test:a' namespace has the correct value");
}, "set innerHTML to an XHTML fragment with in-scope namespace prefixes on attributes");

//]]>
</script>
</body>
</html>
